{
<?php if($stat == 'ok'): ?>
"history": {
"page": "<?php echo $page ?>",
"perpage": "<?php echo $perpage ?>",
"pages": "<?php echo $pages ?>",
"total": "<?php echo $total ?>",
<?php include_partial('history_list', array('history' => $history)); ?>
},
<?php else: ?>
"code": "<?php echo $error_code ?>",
"message": "<?php echo $error_msg ?>",
<?php endif; ?>
"stat": "<?php echo $stat ?>"
}